Interface yii\base\Configurable
Implemented by | examples\shop\Product, examples\shop\ShopController, spinitron\dynamicAr\DynamicActiveQuery, spinitron\dynamicAr\DynamicActiveRecord, spinitron\dynamicAr\ValueExpression, tests\unit\data\BaseRecord, tests\unit\data\CustomerQuery, tests\unit\data\ar\Category, tests\unit\data\ar\Customer, tests\unit\data\ar\Item, tests\unit\data\ar\NullValues, tests\unit\data\ar\Order, tests\unit\data\ar\OrderItem, tests\unit\data\ar\OrderItemWithNullFK, tests\unit\data\ar\OrderWithNullFK, tests\unit\data\ar\Profile, tests\unit\data\ar\Type, tests\unit\data\dar\MissingDynColumn, tests\unit\data\dar\Person, tests\unit\data\dar\Product, tests\unit\data\dar\Supplier, yii\base\Action, yii\base\ActionEvent, yii\base\ActionFilter, yii\base\Behavior, yii\base\Component, yii\base\Controller, yii\base\DynamicModel, yii\base\ErrorHandler, yii\base\Event, yii\base\InlineAction, yii\base\Model, yii\base\ModelEvent, yii\base\Object, yii\base\Request, yii\base\Response, yii\base\Security, yii\base\Theme, yii\base\View, yii\base\ViewEvent, yii\base\ViewRenderer, yii\base\Widget, yii\db\ActiveQuery, yii\db\ActiveRecord, yii\db\AfterSaveEvent, yii\db\BaseActiveRecord, yii\db\BatchQueryResult, yii\db\ColumnSchema, yii\db\Command, yii\db\Connection, yii\db\DataReader, yii\db\Expression, yii\db\Migration, yii\db\Query, yii\db\QueryBuilder, yii\db\Schema, yii\db\TableSchema, yii\db\Transaction, yii\db\cubrid\QueryBuilder, yii\db\cubrid\Schema, yii\db\mssql\QueryBuilder, yii\db\mssql\Schema, yii\db\mssql\TableSchema, yii\db\mysql\QueryBuilder, yii\db\mysql\Schema, yii\db\oci\QueryBuilder, yii\db\oci\Schema, yii\db\pgsql\QueryBuilder, yii\db\pgsql\Schema, yii\db\sqlite\QueryBuilder, yii\db\sqlite\Schema |
---|---|
Available since version | 2.0.3 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/base/Configurable.php |
Configurable is the interface that should be implemented by classes who support configuring its properties through the last parameter to its constructor.
The interface does not declare any method. Classes implementing this interface must declare their constructors like the following:
public function __constructor($param1, $param2, ..., $config = [])
That is, the last parameter of the constructor must accept a configuration array.
This interface is mainly used by \yii\di\Container so that it can pass object configuration as the last parameter to the implementing class' constructor.